package cn.ilikes.tools.nosql.jpa.persistences.contexts;

public interface Operation<V> {

	public enum OperationType {
		delete, update, query, find, insert, saveorUpdate, reference
	}

	public OperationType getOperationType();

	public boolean init();

	/**
	 * if exec error throw ContextRuntimeException
	 * 
	 * @return
	 */
	public V exec();

	public boolean flush();

	public boolean rollback();

}
